{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport Portal from '@rc-component/portal';\nimport useId from \"rc-util/es/hooks/useId\";\nvar COVER_PROPS = {\n  fill: 'transparent',\n  pointerEvents: 'auto'\n};\nvar Mask = function Mask(props) {\n  var prefixCls = props.prefixCls,\n    rootClassName = props.rootClassName,\n    pos = props.pos,\n    mask = props.mask,\n    open = props.open,\n    animated = props.animated;\n  var id = useId();\n  var maskId = \"\".concat(prefixCls, \"-mask-\").concat(id);\n  var mergedAnimated = _typeof(animated) === 'object' ? animated === null || animated === void 0 ? void 0 : animated.placeholder : animated;\n  return /*#__PURE__*/React.createElement(Portal, {\n    open: open,\n    autoLock: true\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-mask\"), rootClassName),\n    style: {\n      position: 'fixed',\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0,\n      zIndex: 900,\n      pointerEvents: 'none'\n    }\n  }, mask ? /*#__PURE__*/React.createElement(\"svg\", {\n    style: {\n      width: '100%',\n      height: '100%'\n    }\n  }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"mask\", {\n    id: maskId\n  }, /*#__PURE__*/React.createElement(\"rect\", {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: \"100%\",\n    fill: \"white\"\n  }), pos && /*#__PURE__*/React.createElement(\"rect\", {\n    x: pos.left,\n    y: pos.top,\n    rx: pos.radius,\n    width: pos.width,\n    height: pos.height,\n    fill: \"black\",\n    className: mergedAnimated ? \"\".concat(prefixCls, \"-placeholder-animated\") : ''\n  }))), /*#__PURE__*/React.createElement(\"rect\", {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: \"100%\",\n    fill: \"rgba(0,0,0,0.5)\",\n    mask: \"url(#\".concat(maskId, \")\")\n  }), pos && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: pos.top\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: \"0\",\n    width: pos.left,\n    height: \"100%\"\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: pos.top + pos.height,\n    width: \"100%\",\n    height: \"calc(100vh - \".concat(pos.top + pos.height, \"px)\")\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: pos.left + pos.width,\n    y: \"0\",\n    width: \"calc(100vw - \".concat(pos.left + pos.width, \"px)\"),\n    height: \"100%\"\n  })))) : null));\n};\nexport default Mask;","map":{"version":3,"names":["_extends","_typeof","React","classNames","Portal","useId","COVER_PROPS","fill","pointerEvents","Mask","props","prefixCls","rootClassName","pos","mask","open","animated","id","maskId","concat","mergedAnimated","placeholder","createElement","autoLock","className","style","position","left","right","top","bottom","zIndex","width","height","x","y","rx","radius","Fragment"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@rc-component/tour/es/Mask.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport Portal from '@rc-component/portal';\nimport useId from \"rc-util/es/hooks/useId\";\nvar COVER_PROPS = {\n  fill: 'transparent',\n  pointerEvents: 'auto'\n};\n\nvar Mask = function Mask(props) {\n  var prefixCls = props.prefixCls,\n      rootClassName = props.rootClassName,\n      pos = props.pos,\n      mask = props.mask,\n      open = props.open,\n      animated = props.animated;\n  var id = useId();\n  var maskId = \"\".concat(prefixCls, \"-mask-\").concat(id);\n  var mergedAnimated = _typeof(animated) === 'object' ? animated === null || animated === void 0 ? void 0 : animated.placeholder : animated;\n  return /*#__PURE__*/React.createElement(Portal, {\n    open: open,\n    autoLock: true\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-mask\"), rootClassName),\n    style: {\n      position: 'fixed',\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0,\n      zIndex: 900,\n      pointerEvents: 'none'\n    }\n  }, mask ? /*#__PURE__*/React.createElement(\"svg\", {\n    style: {\n      width: '100%',\n      height: '100%'\n    }\n  }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"mask\", {\n    id: maskId\n  }, /*#__PURE__*/React.createElement(\"rect\", {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: \"100%\",\n    fill: \"white\"\n  }), pos && /*#__PURE__*/React.createElement(\"rect\", {\n    x: pos.left,\n    y: pos.top,\n    rx: pos.radius,\n    width: pos.width,\n    height: pos.height,\n    fill: \"black\",\n    className: mergedAnimated ? \"\".concat(prefixCls, \"-placeholder-animated\") : ''\n  }))), /*#__PURE__*/React.createElement(\"rect\", {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: \"100%\",\n    fill: \"rgba(0,0,0,0.5)\",\n    mask: \"url(#\".concat(maskId, \")\")\n  }), pos && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: \"0\",\n    width: \"100%\",\n    height: pos.top\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: \"0\",\n    width: pos.left,\n    height: \"100%\"\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: \"0\",\n    y: pos.top + pos.height,\n    width: \"100%\",\n    height: \"calc(100vh - \".concat(pos.top + pos.height, \"px)\")\n  })), /*#__PURE__*/React.createElement(\"rect\", _extends({}, COVER_PROPS, {\n    x: pos.left + pos.width,\n    y: \"0\",\n    width: \"calc(100vw - \".concat(p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